package com.boarsoft.demo.controller;

import java.io.IOException;

import javax.servlet.ServletException;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.boarsoft.demo.service.DemoService;

@RestController
public class Controller {
	// @Autowired(required = false)
	// protected LoadBalancerClient balancer;
	// @Autowired
	// protected DiscoveryClient discoveryClient;
	// @Autowired
	// protected ServiceRegistry serviceRegistry;
	// @Autowired
	// private Environment environment;
	
	@Reference(timeout = 600000)
	protected DemoService demoService;

	@RequestMapping("/test")
	public String test() throws ServletException, IOException {
		return demoService.hello();
	}

}
